package com.xb.model.domain.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@TableName("payment_order")
public class PaymentOrder {
    
    @TableId(type = IdType.AUTO)
    private Long id;
    
    private Long userId;
    
    private String orderNo;
    
    private BigDecimal amount;
    
    // 1: 微信支付, 2: 支付宝支付
    private Integer paymentType;
    
    // 0: 未支付, 1: 已支付, 2: 支付失败, 3: 已取消
    private Integer status;
    
    private String packageType;
    
    private Integer packagePoints;
    
    private String packageDuration;
    
    // 支付平台返回的交易号
    private String transactionId;
    
    // 支付二维码链接
    private String qrCodeUrl;
    
    // 支付成功时间
    private LocalDateTime payTime;
    
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;
    
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;
    
    @TableLogic
    private Integer isDeleted;
    
    // 手机号（通过关联查询获取，不在数据库表中）
    @TableField(exist = false)
    private String phone;
} 